package pl.veneo.wigprofit.model {
	/**
	 * @author Tomasz Swierszcz, fiodorkrk@gmail.com
	 */
	public class Configuration {
		
		private var _indexColor: int = 0xAF1122;
		private var _percentColor: int = 0x1192FF;
		private var _lightColor: int = 0xBBBBBB;
		private var _strongColor: int = 0xEEEEEE;
		private var _bgColor: int = 0xFFFFFF;
		private var _beginDate: Date;
		private var _endDate: Date;
		public var beginDateSet: Boolean = false;
		public var endDateSet: Boolean = false;
		
		public static var instance : Configuration;
		
		public static function getInstance() : Configuration {
			if ( instance == null ) instance = new Configuration();
			return instance;
		}
		
		public function Configuration() {
		}

		public function get indexColor() : int {
			return _indexColor;
		}

		public function set indexColor(indexColor : int) : void {
			_indexColor = indexColor;
		}

		public function get percentColor() : int {
			return _percentColor;
		}

		public function set percentColor(percentColor : int) : void {
			_percentColor = percentColor;
		}

		public function get lightColor() : int {
			return _lightColor;
		}

		public function set lightColor(lightColor : int) : void {
			_lightColor = lightColor;
		}

		public function get strongColor() : int {
			return _strongColor;
		}

		public function set strongColor(strongColor : int) : void {
			_strongColor = strongColor;
		}

		public function setBeginDate(beginDate : String) : void {
			var data: Array = beginDate.split("-");
			_beginDate = new Date(int(data[2]), int(data[1]) - 1, int(data[0]));
			beginDateSet = true;
			
		}
		
		public function setEndDate(endDate : String) : void {
			var data: Array = endDate.split("-");
			_endDate = new Date(int(data[2]), int(data[1]) - 1, int(data[0]));
			endDateSet = true;
		}

		public function get beginDate() : Date {
			return _beginDate;
		}

		public function get endDate() : Date {
			return _endDate;
		}

		public function get bgColor() : int {
			return _bgColor;
		}

		public function set bgColor(bgColor : int) : void {
			_bgColor = bgColor;
		}

		
		
	}
}
